import { request } from "./request.js";
//查询商品列表
export function getGoodsList(queryInfo) {
  return request({
    method: "get",
    url: "goods",
    params: queryInfo //参数为类型为object,不用加花括号进行参数指定
  });
}
//删除商品
export function removeById(id) {
  return request({
    method: "delete",
    url: "goods",
    params: {
      id: id
    }
  });
}
//添加商品
export function addGood(addForm) {
  return request({
    method: "post",
    url: "goods",
    data: addForm
  });
}
